import React from 'react'
import { Select } from 'antd';
const { Option } = Select


export default class Navs extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      name: '',
      value: ''
    }
    this.change = this.change.bind(this)
    this.valueCha = this.valueCha.bind(this)
    this.handleChange = this.handleChange.bind(this)
  }

  componentDidMount() {
    console.log(this.props, 'proesee')
  }

  change (event) {
    console.log(event.target.value, 'name')
    this.setState({name: event.target.value})
  }
  valueCha (val) {
    this.setState({value: val.target.value})
  }

  handleChange (val) {
    console.log(val, 'vall')
  }

  render () {
    return (
      <div className="navs">
        <form>
          <input type="text" value={this.state.name} placeholder="请输入名称" onChange={this.change} /><br/>
          <textarea value={this.state.value} placeholder="请输入内容" onChange={this.valueCha}></textarea>
        </form>
        <div>
        <Select defaultValue="lucy" style={{ width: 120 }} onChange={this.handleChange}>
          <Option value="jack">Jack</Option>
          <Option value="lucy">Lucy</Option>
          <Option value="disabled" disabled>
            Disabled
          </Option>
          <Option value="Yiminghe">yiminghe</Option>
        </Select>
        </div>
        {this.props.children}
      </div>
    )
  }
}